34. Quiz: More With Dictionaries
Context
Use the dictionary below to answer ALL of the questions regarding dictionaries. Consider you have a dictionary named animals
that looks like this:
animals = {'dogs': [20, 10, 15, 8, 32, 15], 'cats': [3,4,2,8,2,4], 'rabbits': [2, 3, 3], 'fish': [0.3, 0.5, 0.8, 0.3, 1]}
Let's try a few ideas with this dictionary! If you want to try any of the code yourself, you can test it in the environment at the bottom of the page.
QUIZ QUESTION::
Question 1
Match each description to the value it describes.
ANSWER CHOICES:
Description |
Value |
---|---|
The data type of the keys in the dictionary. |
|
The data type of the values in the dictionary. |
|
The result of |
|
The result of |
|
The result of |
|
The result of |
SOLUTION:
Description |
Value |
---|---|
The result of |
|
The result of |
|
The result of |
|
The data type of the values in the dictionary. |
|
The result of |
|
The result of |
|
The data type of the keys in the dictionary. |
|
The result of |
Start Quiz:
animals = {'dogs': [20, 10, 15, 8, 32, 15],
'cats': [3,4,2,8,2,4],
'rabbits': [2, 3, 3],
'fish': [0.3, 0.5, 0.8, 0.3, 1]}